// vuex中的opened“计算属性”
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  userId: state => state.user.userInfo.userId,
  avatar: state => state.user.userInfo.staffPhoto,
  name: state => state.user.userInfo.username,
  company: state => state.user.userInfo.company,
  departmentName: state => state.user.userInfo.departmentName,
  // name(state) {
  //   return state.user.name
  // }
  routes: state => state.user.routes
}

// 便捷访问
// this.$store.state.user.token
// this.$store.getters.token
export default getters
